//===================================================================
// 项目名: Hbt.Application
// 文件名: HbtPcbaOutputDetailDto.cs
// 创建者: Claude
// 创建时间: 2024-12-01
// 版本号: V0.0.1
// 描述: PCBA产出明细表数据传输对象
//===================================================================

using System;
using System.Collections.Generic;
using Hbt.Common.Models;
using Mapster;

namespace Hbt.Application.Dtos.Logistics.Manufacturing.Execution.Outputs.Pcba
{
    /// <summary>
    /// PCBA产出明细表基础DTO
    /// </summary>
    public class HbtPcbaOutputDetailDto
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public HbtPcbaOutputDetailDto()
        {
            TimePeriod = string.Empty;
            PcbBoardType = string.Empty;
            PanelSide = string.Empty;
            CompletedStatus = string.Empty;
            SerialNo = string.Empty;
            UnachievedReason = string.Empty;
            UnachievedDescription = string.Empty;
        }

        /// <summary>
        /// 主键ID（适配字段）
        /// </summary>
        [AdaptMember("Id")]
        public long PcbaOutputDetailId { get; set; }

        /// <summary>
        /// PCBA日报ID
        /// </summary>
        public long PcbaOutputId { get; set; }

        /// <summary>
        /// 生产时段
        /// </summary>
        public string TimePeriod { get; set; } = string.Empty;

        /// <summary>
        /// 班组
        /// </summary>
        public int ShiftNo { get; set; } = 1;

        /// <summary>
        /// 板别
        /// </summary>
        public string PcbBoardType { get; set; } = string.Empty;

        /// <summary>
        /// 面板别
        /// </summary>
        public string PanelSide { get; set; } = string.Empty;

        /// <summary>
        /// 批次数量
        /// </summary>
        public decimal BatchQty { get; set; } = 0;

        /// <summary>
        /// 当日完成数
        /// </summary>
        public decimal DailyCompletedQty { get; set; } = 0;

        /// <summary>
        /// 累计完成数
        /// </summary>
        public decimal TotalCompletedQty { get; set; } = 0;

        /// <summary>
        /// 完成状态
        /// </summary>
        public string CompletedStatus { get; set; } = string.Empty;

        /// <summary>
        /// 序列号
        /// </summary>
        public string SerialNo { get; set; } = string.Empty;

        /// <summary>
        /// 不良台数
        /// </summary>
        public int DefectCount { get; set; } = 0;

        /// <summary>
        /// 投入工数
        /// </summary>
        public decimal InputMinutes { get; set; } = 0;

        /// <summary>
        /// 修工数
        /// </summary>
        public decimal RepairMinutes { get; set; } = 0;

        /// <summary>
        /// 切换次数
        /// </summary>
        public int SwitchCount { get; set; } = 0;

        /// <summary>
        /// 切换时间
        /// </summary>
        public decimal SwitchTime { get; set; } = 0;

        /// <summary>
        /// 切停机时间
        /// </summary>
        public decimal StopTime { get; set; } = 0;

        /// <summary>
        /// 总工数
        /// </summary>
        public decimal TotalMinutes { get; set; } = 0;

        /// <summary>
        /// 未达成原因
        /// </summary>
        public string? UnachievedReason { get; set; }

        /// <summary>
        /// 未达成说明
        /// </summary>
        public string? UnachievedDescription { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string? CreateBy { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        public string? UpdateBy { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
    }

    /// <summary>
    /// PCBA产出明细表查询DTO
    /// </summary>
    public class HbtPcbaOutputDetailQueryDto : HbtPagedQuery
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public HbtPcbaOutputDetailQueryDto()
        {
            TimePeriod = string.Empty;
            PcbBoardType = string.Empty;
            PanelSide = string.Empty;
            CompletedStatus = string.Empty;
            SerialNo = string.Empty;
        }

        /// <summary>
        /// PCBA日报ID
        /// </summary>
        public long? PcbaOutputId { get; set; }

        /// <summary>
        /// 生产时段
        /// </summary>
        public string? TimePeriod { get; set; }

        /// <summary>
        /// 班组
        /// </summary>
        public int? ShiftNo { get; set; }

        /// <summary>
        /// 板别
        /// </summary>
        public string? PcbBoardType { get; set; }

        /// <summary>
        /// 面板别
        /// </summary>
        public string? PanelSide { get; set; }

        /// <summary>
        /// 完成状态
        /// </summary>
        public string? CompletedStatus { get; set; }

        /// <summary>
        /// 序列号
        /// </summary>
        public string? SerialNo { get; set; }
    }

    /// <summary>
    /// PCBA产出明细表创建DTO
    /// </summary>
    public class HbtPcbaOutputDetailCreateDto
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public HbtPcbaOutputDetailCreateDto()
        {
            TimePeriod = string.Empty;
            PcbBoardType = string.Empty;
            PanelSide = string.Empty;
            CompletedStatus = string.Empty;
            SerialNo = string.Empty;
            UnachievedReason = string.Empty;
            UnachievedDescription = string.Empty;
        }

        /// <summary>
        /// PCBA日报ID
        /// </summary>
        public long PcbaOutputId { get; set; }

        /// <summary>
        /// 生产时段
        /// </summary>
        public string TimePeriod { get; set; } = string.Empty;

        /// <summary>
        /// 班组
        /// </summary>
        public int ShiftNo { get; set; } = 1;

        /// <summary>
        /// 板别
        /// </summary>
        public string PcbBoardType { get; set; } = string.Empty;

        /// <summary>
        /// 面板别
        /// </summary>
        public string PanelSide { get; set; } = string.Empty;

        /// <summary>
        /// 批次数量
        /// </summary>
        public decimal BatchQty { get; set; } = 0;

        /// <summary>
        /// 当日完成数
        /// </summary>
        public decimal DailyCompletedQty { get; set; } = 0;

        /// <summary>
        /// 累计完成数
        /// </summary>
        public decimal TotalCompletedQty { get; set; } = 0;

        /// <summary>
        /// 完成状态
        /// </summary>
        public string CompletedStatus { get; set; } = string.Empty;

        /// <summary>
        /// 序列号
        /// </summary>
        public string SerialNo { get; set; } = string.Empty;

        /// <summary>
        /// 不良台数
        /// </summary>
        public int DefectCount { get; set; } = 0;

        /// <summary>
        /// 投入工数
        /// </summary>
        public decimal InputMinutes { get; set; } = 0;

        /// <summary>
        /// 修工数
        /// </summary>
        public decimal RepairMinutes { get; set; } = 0;

        /// <summary>
        /// 切换次数
        /// </summary>
        public int SwitchCount { get; set; } = 0;

        /// <summary>
        /// 切换时间
        /// </summary>
        public decimal SwitchTime { get; set; } = 0;

        /// <summary>
        /// 切停机时间
        /// </summary>
        public decimal StopTime { get; set; } = 0;

        /// <summary>
        /// 总工数
        /// </summary>
        public decimal TotalMinutes { get; set; } = 0;

        /// <summary>
        /// 未达成原因
        /// </summary>
        public string? UnachievedReason { get; set; }

        /// <summary>
        /// 未达成说明
        /// </summary>
        public string? UnachievedDescription { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
    }

    /// <summary>
    /// PCBA产出明细表更新DTO
    /// </summary>
    public class HbtPcbaOutputDetailUpdateDto : HbtPcbaOutputDetailCreateDto
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public HbtPcbaOutputDetailUpdateDto() : base()
        {
        }

        /// <summary>
        /// 主键ID（适配字段）
        /// </summary>
        [AdaptMember("Id")]
        public long PcbaOutputDetailId { get; set; }
    }

    /// <summary>
    /// PCBA产出明细表导入DTO
    /// </summary>
    public class HbtPcbaOutputDetailImportDto
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public HbtPcbaOutputDetailImportDto()
        {
            TimePeriod = string.Empty;
            PcbBoardType = string.Empty;
            PanelSide = string.Empty;
            CompletedStatus = string.Empty;
            SerialNo = string.Empty;
            UnachievedReason = string.Empty;
            UnachievedDescription = string.Empty;
        }

        /// <summary>
        /// PCBA日报ID
        /// </summary>
        public long PcbaOutputId { get; set; }

        /// <summary>
        /// 生产时段
        /// </summary>
        public string TimePeriod { get; set; } = string.Empty;

        /// <summary>
        /// 班组
        /// </summary>
        public int ShiftNo { get; set; } = 1;

        /// <summary>
        /// 板别
        /// </summary>
        public string PcbBoardType { get; set; } = string.Empty;

        /// <summary>
        /// 面板别
        /// </summary>
        public string PanelSide { get; set; } = string.Empty;

        /// <summary>
        /// 批次数量
        /// </summary>
        public decimal BatchQty { get; set; } = 0;

        /// <summary>
        /// 当日完成数
        /// </summary>
        public decimal DailyCompletedQty { get; set; } = 0;

        /// <summary>
        /// 累计完成数
        /// </summary>
        public decimal TotalCompletedQty { get; set; } = 0;

        /// <summary>
        /// 完成状态
        /// </summary>
        public string CompletedStatus { get; set; } = string.Empty;

        /// <summary>
        /// 序列号
        /// </summary>
        public string SerialNo { get; set; } = string.Empty;

        /// <summary>
        /// 不良台数
        /// </summary>
        public int DefectCount { get; set; } = 0;

        /// <summary>
        /// 投入工数
        /// </summary>
        public decimal InputMinutes { get; set; } = 0;

        /// <summary>
        /// 修工数
        /// </summary>
        public decimal RepairMinutes { get; set; } = 0;

        /// <summary>
        /// 切换次数
        /// </summary>
        public int SwitchCount { get; set; } = 0;

        /// <summary>
        /// 切换时间
        /// </summary>
        public decimal SwitchTime { get; set; } = 0;

        /// <summary>
        /// 切停机时间
        /// </summary>
        public decimal StopTime { get; set; } = 0;

        /// <summary>
        /// 总工数
        /// </summary>
        public decimal TotalMinutes { get; set; } = 0;

        /// <summary>
        /// 未达成原因
        /// </summary>
        public string? UnachievedReason { get; set; }

        /// <summary>
        /// 未达成说明
        /// </summary>
        public string? UnachievedDescription { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
    }

    /// <summary>
    /// PCBA产出明细表导出DTO
    /// </summary>
    public class HbtPcbaOutputDetailExportDto
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public HbtPcbaOutputDetailExportDto()
        {
            TimePeriod = string.Empty;
            PcbBoardType = string.Empty;
            PanelSide = string.Empty;
            CompletedStatus = string.Empty;
            SerialNo = string.Empty;
        }

        /// <summary>
        /// 生产时段
        /// </summary>
        public string TimePeriod { get; set; } = string.Empty;

        /// <summary>
        /// 班组
        /// </summary>
        public int ShiftNo { get; set; } = 1;

        /// <summary>
        /// 板别
        /// </summary>
        public string PcbBoardType { get; set; } = string.Empty;

        /// <summary>
        /// 面板别
        /// </summary>
        public string PanelSide { get; set; } = string.Empty;

        /// <summary>
        /// 批次数量
        /// </summary>
        public decimal BatchQty { get; set; } = 0;

        /// <summary>
        /// 当日完成数
        /// </summary>
        public decimal DailyCompletedQty { get; set; } = 0;

        /// <summary>
        /// 累计完成数
        /// </summary>
        public decimal TotalCompletedQty { get; set; } = 0;

        /// <summary>
        /// 完成状态
        /// </summary>
        public string CompletedStatus { get; set; } = string.Empty;

        /// <summary>
        /// 序列号
        /// </summary>
        public string SerialNo { get; set; } = string.Empty;

        /// <summary>
        /// 不良台数
        /// </summary>
        public int DefectCount { get; set; } = 0;

        /// <summary>
        /// 投入工数
        /// </summary>
        public decimal InputMinutes { get; set; } = 0;

        /// <summary>
        /// 修工数
        /// </summary>
        public decimal RepairMinutes { get; set; } = 0;

        /// <summary>
        /// 切换次数
        /// </summary>
        public int SwitchCount { get; set; } = 0;

        /// <summary>
        /// 切换时间
        /// </summary>
        public decimal SwitchTime { get; set; } = 0;

        /// <summary>
        /// 切停机时间
        /// </summary>
        public decimal StopTime { get; set; } = 0;

        /// <summary>
        /// 总工数
        /// </summary>
        public decimal TotalMinutes { get; set; } = 0;
    }

    /// <summary>
    /// PCBA产出明细表模板DTO
    /// </summary>
    public class HbtPcbaOutputDetailTemplateDto
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public HbtPcbaOutputDetailTemplateDto()
        {
            TimePeriod = string.Empty;
            PcbBoardType = string.Empty;
            PanelSide = string.Empty;
            CompletedStatus = string.Empty;
            SerialNo = string.Empty;
            UnachievedReason = string.Empty;
            UnachievedDescription = string.Empty;
        }

        /// <summary>
        /// 生产时段
        /// </summary>
        public string TimePeriod { get; set; } = string.Empty;

        /// <summary>
        /// 班组
        /// </summary>
        public int ShiftNo { get; set; } = 1;

        /// <summary>
        /// 板别
        /// </summary>
        public string PcbBoardType { get; set; } = string.Empty;

        /// <summary>
        /// 面板别
        /// </summary>
        public string PanelSide { get; set; } = string.Empty;

        /// <summary>
        /// 批次数量
        /// </summary>
        public decimal BatchQty { get; set; } = 0;

        /// <summary>
        /// 当日完成数
        /// </summary>
        public decimal DailyCompletedQty { get; set; } = 0;

        /// <summary>
        /// 累计完成数
        /// </summary>
        public decimal TotalCompletedQty { get; set; } = 0;

        /// <summary>
        /// 完成状态
        /// </summary>
        public string CompletedStatus { get; set; } = string.Empty;

        /// <summary>
        /// 序列号
        /// </summary>
        public string SerialNo { get; set; } = string.Empty;

        /// <summary>
        /// 不良台数
        /// </summary>
        public int DefectCount { get; set; } = 0;

        /// <summary>
        /// 投入工数
        /// </summary>
        public decimal InputMinutes { get; set; } = 0;

        /// <summary>
        /// 修工数
        /// </summary>
        public decimal RepairMinutes { get; set; } = 0;

        /// <summary>
        /// 切换次数
        /// </summary>
        public int SwitchCount { get; set; } = 0;

        /// <summary>
        /// 切换时间
        /// </summary>
        public decimal SwitchTime { get; set; } = 0;

        /// <summary>
        /// 切停机时间
        /// </summary>
        public decimal StopTime { get; set; } = 0;

        /// <summary>
        /// 总工数
        /// </summary>
        public decimal TotalMinutes { get; set; } = 0;

        /// <summary>
        /// 未达成原因
        /// </summary>
        public string? UnachievedReason { get; set; }

        /// <summary>
        /// 未达成说明
        /// </summary>
        public string? UnachievedDescription { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
    }

    /// <summary>
    /// PCBA产出明细表状态更新DTO
    /// </summary>
    public class HbtPcbaOutputDetailStatusDto
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public HbtPcbaOutputDetailStatusDto()
        {
        }

        /// <summary>
        /// 主键ID（适配字段）
        /// </summary>
        [AdaptMember("Id")]
        public long PcbaOutputDetailId { get; set; }

        /// <summary>
        /// 状态（0停用 1正常）
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
    }
}
